package com.ch.light.web.mapper;

import com.ch.light.web.model.Role;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface RoleMapper extends Mapper<Role> {
    List<Role> findByUserId(@Param("userId") String userId);

    int removeAssignMenuByRoleId(String roleId);

    int assignMenu(@Param("roleId") String roleId, @Param("menuId") String menuId);

    void reassignMenu(@Param("roleId") String roleId, @Param("menuId") String menuId);
}